{% extends 'father.html' %}

{% block main %}

    <form method="POST" action="/emp/add/">
        {% csrf_token %}
        <h2>添加员工信息</h2>
        <div class="mb-3">
            <label for="exampleInputName" class="form-label">员工姓名</label>
            <input type="text" name="e_name" class="form-control" id="exampleInputName">
        </div>
        <div class="mb-3">
            <label for="exampleInputPassword" class="form-label">密码</label>
            <input type="password" name="password" class="form-control" id="exampleInputPassword">
        </div>
        <div class="mb-3">
            <label for="exampleInputAge" class="form-label">年龄</label>
            <input type="number" min="18" name="age" class="form-control" id="exampleInputAge">
        </div>

        <div class="mb-3">
            <label class="form-label">性别:</label> &nbsp;&nbsp;&nbsp;&nbsp;
            <label for="exampleInputGender1" class="form-label">男</label>
            <input type="radio" name="gender" value="1" id="exampleInputGender1">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <label for="exampleInputGender2" class="form-label">女</label>
            <input type="radio" name="gender" value="2" id="exampleInputGender2">
        </div>

        <div class="mb-3">
            <label for="exampleInputAccount" class="form-label">工资</label>
            <input type="text" name="account" class="form-control" id="exampleAccount">
        </div>

        <div class="mb-3">
            <label for="exampleInputDate" class="form-label">入职时间</label>
            <input type="date" name="create_time" class="form-control" id="exampleDate">
        </div>

        <div class="mb-3">
            <label for="exampleInputDept" class="form-label">部门</label>
            <select class="form-select" name="dept" aria-label="Default select example"  id="exampleInputDept">
                <option selected>请选择部门</option>
                {% for dept in depts %}
                    <option value="{{ dept.id }}">{{ dept.title }}</option>
                {% endfor   %}
            </select>
        </div>

        <button type="submit" class="btn btn-primary">立即添加</button>
    </form>
{% endblock %}